package structsx

import (
	"utilx/comparex"
)

type myInt = int
type myInt2 = int

func typeAlias() {
	var asd myInt
	var asd2 myInt2
	comparex.Eq(asd, asd2)

	var asdx myInt = 0
	var asd2x myInt2 = 0
	comparex.Eq(asdx, asd2x)

}

type Empty struct {
}

func typeEmpty() {
	var empty Empty
	var empty1 Empty
	comparex.Eq(empty, empty1)
	emptyy := Empty{}
	emptyy1 := Empty{}
	comparex.Eq(emptyy, emptyy1)
}

type Basic struct {
	name int
}

func typeBasic() {
	var empty Basic
	var empty1 Basic
	comparex.Eq(empty, empty1)
	emptyy := Basic{1}
	emptyy1 := Basic{1}
	comparex.Eq(emptyy, emptyy1)
}

type MuxBasic struct {
	name int
	data map[string]string //panic map 不能==比较(slice同里)
}

func typeMuxBasic() {
	var empty MuxBasic
	var empty1 MuxBasic
	comparex.Eq(empty, empty1)
	emptyy := MuxBasic{1, map[string]string{}}
	emptyy1 := MuxBasic{1, map[string]string{}}
	comparex.Eq(emptyy, emptyy1)
}

type ColumnBasic1 struct {
	name int
	age  int
}
type ColumnBasic2 struct {
	name int
	age  int
}

func typeColumnBasic() {
	var empty ColumnBasic1
	var empty1 ColumnBasic2
	comparex.Eq(empty, empty1)
	emptyy := ColumnBasic1{1, 2}
	emptyy1 := ColumnBasic2{1, 2}
	comparex.Eq(emptyy, emptyy1)
}

//结构体类型的零值是每个成员都是零值。通常会将零值作为最合理的默认值
